package com.lemobar.pay.model.wxpay.response;

import lombok.Data;
import org.simpleframework.xml.Element;
import org.simpleframework.xml.Root;

/**
 * 微信 付款码下单 同步返回参数
 * 微信付款码支付 https://pay.weixin.qq.com/wiki/doc/api/micropay.php?chapter=9_10&index=1
 */
@Data
@Root(name = "xml", strict = false)
public class WxPayMicroPayCreateResponse {
    /**
     * 返回状态码
     */
    @Element(name = "return_code")
    private String returnCode;

    /**
     * 返回信息
     */
    @Element(name = "return_msg", required = false)
    private String returnMsg;

    /**
     * 以下字段在return_code为SUCCESS的时候有返回. ***********************************
     */

    /**
     * 公众账号ID
     */
    @Element(name = "appid", required = false)
    private String appid;

    /**
     * 商户号
     */
    @Element(name = "mch_id", required = false)
    private String mchId;

    /**
     * 设备号
     */
    @Element(name = "device_info", required = false)
    private String deviceInfo;

    /**
     * 随机字符串
     */
    @Element(name = "nonce_str", required = false)
    private String nonceStr;

    /**
     * 签名
     */
    @Element(name = "sign", required = false)
    private String sign;

    /**
     * 业务结果	 SUCCESS/FAIL
     */
    @Element(name = "result_code", required = false)
    private String resultCode;

    /**
     * 错误代码
     */
    @Element(name = "err_code", required = false)
    private String errCode;

    /**
     * 错误代码描述
     */
    @Element(name = "err_code_des", required = false)
    private String errCodeDes;

    /**
     * 用户标识
     */
    @Element(name = "openid", required = false)
    private String openid;

    /**
     * 是否关注公众账号
     */
    @Element(name = "is_subscribe", required = false)
    private String isSubscribe;

    /**
     * 交易类型
     * MICROPAY 付款码支付
     */
    @Element(name = "trade_type", required = false)
    private String tradeType;

    /**
     * 付款银行
     */
    @Element(name = "bank_type", required = false)
    private String bankType;

    /**
     * 货币类型
     */
    @Element(name = "fee_type", required = false)
    private String feeType;

    /**
     * 订单金额
     * 单位为分
     */
    @Element(name = "total_fee", required = false)
    private Integer totalFee;

    /**
     * 应结订单金额
     */
    @Element(name = "settlement_total_fee", required = false)
    private Integer settlementTotalFee;
    /**
     * 代金券金额
     */
    @Element(name = "coupon_fee", required = false)
    private Integer couponFee;

    /**
     * 现金支付货币类型
     */
    @Element(name = "cash_fee_type", required = false)
    private String cashFeeType;

    /**
     * 现金支付金额
     */
    @Element(name = "cash_fee", required = false)
    private String cashFee;

    /**
     * 微信支付订单号
     */
    @Element(name = "transaction_id", required = false)
    private String transactionId;

    /**
     * 商户订单号
     */
    @Element(name = "out_trade_no", required = false)
    private String outTradeNo;


    /**
     * 商家数据包
     */
    @Element(name = "attach", required = false)
    private String attach;

    /**
     * 支付完成时间
     */
    @Element(name = "time_end", required = false)
    private String timeEnd;

    /**
     * 营销详情
     */
    @Element(name = "promotion_detail", required = false)
    private String promotionDetail;



}
